<?xml version="1.0" encoding="UTF-8" ?>

<!--
    Document   : atom2tree-rdf.xsl
    Created on : April 30, 2006, 7:37 AM
    Author     : alex
    Description:
        Purpose of transformation follows.
-->

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:atom="http://www.w3.org/2005/Atom"
   xmlns:atomic="http://www.atomojo.org/O/atomic/"
   xmlns:atompub="http://www.w3.org/2007/app"
   xmlns:config="http://www.atomojo.org/Vocabulary/Atomic/Configuration/2007/1/0">

<xsl:template match="atompub:service">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:atomic="http://www.atomojo.org/O/atomic/">
      <xsl:text>&#xa;</xsl:text>
      <rdf:Seq rdf:about="http://www.atomojo.org/O/atomic/services">
         <rdf:li rdf:resource="{@xml:base}"/>
      </rdf:Seq>
      <xsl:text>&#xa;</xsl:text>
      <rdf:Description rdf:about="{@xml:base}" atomic:id="{@xml:base}" atomic:title="OFFLINE {@xml:base}" atomic:type="service"/>
      <xsl:text>&#xa;</xsl:text>
      <rdf:Seq rdf:about="{@xml:base}">
         <xsl:text>&#xa;</xsl:text>
         <xsl:for-each select="atompub:workspace">
            <rdf:li rdf:resource="{@client-id}"/>
            <xsl:text>&#xa;</xsl:text>
         </xsl:for-each>
      </rdf:Seq>
      <xsl:text>&#xa;</xsl:text>
      <xsl:apply-templates select="atompub:workspace"/>
   </rdf:RDF>
</xsl:template>

<xsl:template match="config:link">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:atomic="http://www.atomojo.org/O/atomic/">
      <xsl:text>&#xa;</xsl:text>
      <rdf:Seq rdf:about="http://www.atomojo.org/O/atomic/services">
         <rdf:li rdf:resource="{@href}"/>
      </rdf:Seq>
      <xsl:text>&#xa;</xsl:text>
      <rdf:Description rdf:about="{@href}" atomic:id="{@href}" atomic:title="OFFLINE {@href}" atomic:type="service"/>
      <xsl:text>&#xa;</xsl:text>
   </rdf:RDF>
</xsl:template>

</xsl:transform>
